<template>
  <div class="register absolute">
    <div class="register_title">“点点进步，点点成长”</div>
    <div class="main">
      <div class="form_input">
        <div>
          <label
            ><img
              src="http://diandian.zgkpz.com/images/register/user2.png"
              class="img1" />孩子真实姓名：<input type="text" v-model="account"
          /></label>
        </div>
        <div>
          <label
            ><img
              src="http://diandian.zgkpz.com/images/register/phone2.png"
              class="img1" />手机号码：<input type="text" v-model="phone"
          /></label>
        </div>
        <div>
          <label
            ><img
              src="http://diandian.zgkpz.com/images/register/suo2.png"
              class="img1" />设置密码：<input
              type="password"
              v-model="password"
          /></label>
        </div>
        <div>
          <label
            ><img
              src="http://diandian.zgkpz.com/images/register/renzheng2.png"
              class="img1" />验证码：<input
              type="text"
              maxlength="6"
              v-model="captcha"
          /></label>
          <img
            src="http://diandian.zgkpz.com/images/register/msg2.png"
            class="msg"
          />
        </div>
        <div>
          <label
            ><img
              src="http://diandian.zgkpz.com/images/register/age2.png"
              class="img1"
            />选择年级：
            <select>
              <option value=""></option>
              <option value="1">一年级</option>
              <option value="2">二年级</option>
              <option value="3">三年级</option>
              <option value="4">四年级</option>
              <option value="5">五年级</option>
            </select></label
          >
        </div>
        <div>
          <label
            ><img
              src="http://diandian.zgkpz.com/images/register/dingwei2.png"
              class="img1" />所在地址：<input type="text"
          /></label>
        </div>
        <div class="form_button">
          <img
            src="http://diandian.zgkpz.com/images/register/register2.png"
            @click="register"
          />
        </div>
      </div>
    </div>

    <!--弹窗-->
    <div class="pop" v-if="isPop === true">
      <h2>用户注册隐私说明条款</h2>
      <div>
        <p>
          感谢您使用点点英语系统！<br />
          我们非常重视您的个人信息和隐私保护。为了更好的保障您的个人权益，在您使用我们的产品之前，请务必认真阅读
          <span>《用户协议》</span>、 <span>《保密协议》</span>、
          <span>《权限说明》</span>
        </p>
      </div>
      <div class="ar_button">
        <div>
          <img
            src="http://diandian.zgkpz.com/images/register/unagree2.png"
            @click="noagree"
          />
        </div>
        <div>
          <img
            src="http://diandian.zgkpz.com/images/register/agree2.png"
            @click="noagree"
          />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "Login",
  data: function () {
    return {
      isPop: false,
    };
  },
  created() {
    window.addEventListener("resize", this.handleResize);
  },
  mounted: function () {},
  methods: {
    handleResize() {
      if (document.body.clientWidth <= 768) {
        this.$router.replace({ path: "/login" });
      }
    },
    async register() {
      this.$router.replace({ path: "/web/index" });
    },
  },
};
</script>
<style scoped>
.code img {
  width: 100%;
  height: 100%;
}
.register {
  background-image: url("http://diandian.zgkpz.com/images/m_rank/background.png");
  background-size: 100% 100%;
  height: 100vh;
  position: relative;
}
.main {
  height: 3.2rem;
  width: 50%;
  background: url("http://diandian.zgkpz.com/images/register/formbackgroud2.png")
    no-repeat;
  background-size: 100%100%;
  font-family: SimHei;
  margin: auto;
}
.form_input {
  font-size: 16px;
  color: #ffffff;
  line-height: 0.5rem;
  position: relative;
  top: 16%;
}
.form_input label {
  display: flex;
  align-items: center;
  line-height: 0.4rem;
}
.form_input div {
  width: 3.1rem;
  height: 0.3rem;
  border-bottom: 3px solid #fce833;
  margin-left: 0.3rem;
  position: relative;
}
.form_button {
  text-align: center;
  padding: 0.3rem;
  border: unset !important;
}
.form_input input {
  width: 2rem;
  color: #ffffff;
}
.form_input select {
  width: 2rem;
  color: #ffffff;
}
.main .form_input .img1 {
  width: 0.1rem;
  margin-right: 0.1rem;
  margin-left: 0.2rem;
}

.main .form_input .msg {
  width: 0.47rem;
  height: 0.15rem;
  position: absolute;
  right: 10%;
  top: 40%;
}
.main img {
  width: 1rem;
}
.pop {
  width: 3rem;
  height: 3rem;
  background: rgb(207, 255, 227);
  border-radius: 0.3rem;
  position: relative;
  top: 3rem;
  font-family: SimHei;
}
.pop h2 {
  font-size: 0.2rem;
  text-align: center;
  padding: 0.2rem;
}
.pop p {
  font-size: 0.15rem;
  text-align: left;
  padding: 0 0.5rem 0.5rem 0.5rem;
}
.ar_button {
  text-align: center;
  display: flex;
  justify-content: center;
}
.ar_button img {
  width: 75%;
}
.register_title{
  color: #ffffff;
  font-size: 0.2rem;
  text-align: center;
  padding-top: 0.1rem;
}
</style>
